package com.bdqn.t296.noso.service.Imp;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bdqn.t296.noso.entity.*;
import com.bdqn.t296.noso.mapper.DepartmentsMapper;
import com.bdqn.t296.noso.mapper.RegisteredtypeMapper;
import com.bdqn.t296.noso.mapper.UserRegisertMapper;
import com.bdqn.t296.noso.service.UserRegisertService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserRegisertServiceImp implements UserRegisertService {
    @Resource
    UserRegisertMapper userRegisertMapper;
    @Resource
    DepartmentsMapper departmentsMapper;
    @Resource
    RegisteredtypeMapper registeredtypeMapper;

    //模糊分页查询
    @Override
    public IPage<ReportVo> sel(Page<ReportVo> page, ReportVo reportVo) {
        return userRegisertMapper.sel(page, reportVo);
    }

    //查询所有科室
    @Override
    public List<CDepartments> seldep() {
        return departmentsMapper.selectList(null);
    }

    //查询所有挂号类型
    @Override
    public List<CRegisteredtype> selreg() {
        return registeredtypeMapper.selectList(null);
    }

    //查询一周的医生信息
    @Override
    public List<CDoctor> one(CDoctor cDoctor) {
        return userRegisertMapper.one(cDoctor);
    }

    @Override
    public List<CDoctor> two(CDoctor cDoctor) {
        return userRegisertMapper.two(cDoctor);
    }

    @Override
    public List<CDoctor> three(CDoctor cDoctor) {
        return userRegisertMapper.three(cDoctor);
    }

    @Override
    public List<CDoctor> four(CDoctor cDoctor) {
        return userRegisertMapper.four(cDoctor);
    }

    @Override
    public List<CDoctor> five(CDoctor cDoctor) {
        return userRegisertMapper.five(cDoctor);
    }

    @Override
    public List<CDoctor> six(CDoctor cDoctor) {
        return userRegisertMapper.six(cDoctor);
    }

    @Override
    public List<CDoctor> seven(CDoctor cDoctor) {
        return userRegisertMapper.seven(cDoctor);
    }

    //根据类型ID查询价格
    @Override
    public Integer seltymo(CRegisteredtype cRegisteredtype) {
        return userRegisertMapper.seltymo(cRegisteredtype);
    }


    //添加挂号
    @Override
    public int addre(CReport cReport) {
        return userRegisertMapper.insert(cReport);
    }
}
